import Axios from 'axios'
import { appStore } from "../store/index";
const api = Axios.create({
    baseURL: 'http://localhost:4005',
    withCredentials: true
})

//     let token = store.$state.access_token
//     console.log(token);

api.interceptors.request.use((config: any) => {
    const store = appStore()
    // console.log(store.access_token);
    config.headers.Authorization = `Bearer ${store.access_token}`
    return config
})
export default api